package com.exception;

public class MyTest  {
    //捕获
    static void  test(int a) throws MyExcepion{
        System.out.println(a);
        if (a>10){
            throw new MyExcepion(a); //抛出
        }

        System.out.println("okkkkk");

        //a >10 ? throw new ArithmeticException() :
    }


    public static void main(String[] args) {
        try {
            test (1);
        } catch (Exception e) {
            System.out.println("myException" + e);
        }
    }
}
